package com.kdyzm.demo.springboot.config;

import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author kdyzm
 * @date 2022/1/24
 */
@Configuration
@AutoConfigureAfter({MybatisPlusAutoConfiguration.class})
public class Config {


    @Bean
    public ConfigurationCustomizer configurationCustomizer() {
        return configuration -> {
            //插件拦截链采用了责任链模式，执行顺序和加入连接链的顺序有关
//            configuration.addInterceptor(new StatementHandlerPlugin());
//            configuration.addInterceptor(new ResultSetHandlerPlugin());

        };
    }
}
